import request from '@/utils/request'
// 获取列表
export function getClassList(params) {
  return request({
    url: '/class/class',
    method: 'get',
    params
  })
}
// 获取归属学科
export function getDisciplineList() {
  return request({
    url: '/subject/tree',
    method: 'get'

  })
}

// 获取选择班级信息
export function getChangeClassList(params) {
  return request({
    url: '/class/class',
    method: 'get',
    params
  })
}
// 添加班级信息
export function addClass(data) {
  return request({
    url: '/class/class',
    method: 'post',
    data

  })
}
// 获取单行信息
export function getClass(id) {
  return request({
    url: `/class/class/${id}`,
    method: 'get'

  })
}
// 修改班级信息
export function editClass(data) {
  return request({
    url: `/class/class/${data.id}`,
    method: 'put',
    data

  })
}
// 删除班级信息
export function delClass(data) {
  return request({
    url: `/class/class/${data.id}`,
    method: 'delete',
    data

  })
}
// 获取授课老师
export function getTeacherList(role_name) {
  return request({
    url: '/class/teacher?role_name=' + role_name,
    method: 'get'

  })
}
// 获取助教老师
export function getZhujiaoList(role_name) {
  return request({
    url: '/class/teacher?role_name=' + role_name,
    method: 'get'

  })
}
// 获取班主任老师
export function getBanzhurenList(role_name) {
  return request({
    url: '/class/teacher?role_name=' + role_name,
    method: 'get'

  })
}

// 获取学生信息
export function getStudentList(params) {
  return request({
    url: '/class/student',
    method: 'get',
    params

  })
}

